package com.hutao.manage.query;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import com.hutao.manage.util.StringUtil;

public class MedRecordQuery extends PageQuery {
	
	private String onlyId;

	private String name;
	
	private String idCard;
	
	private String orderType = "asc";
	
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date outHospitalStartDate;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date outHospitalEndDate;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date scanStartDate;
	
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date scanEndDate;
	
	private String mrId;
	
	private Integer visitNumber;
	
	private Integer outHospitalOfficeId;
	
	
	private Integer treamentTraceTypeId;
	
	private Integer paginationStatus;
	
	private List<Integer> outHospitalTypeIds = new ArrayList<Integer>();
	/**
	 * @author yimr
	 * 
	 * 出院方式编号集合
	 */
	private String outHosTypeIds;
	
	

	public String getOnlyId() {
		return onlyId;
	}

	public void setOnlyId(String onlyId) {
		this.onlyId = onlyId;
	}

	public String getName() {
		
		return StringUtil.meaningStr(name);
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIdCard() {
		return StringUtil.meaningStr(idCard);
	}

	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	public Date getOutHospitalStartDate() {
		return outHospitalStartDate;
	}

	public void setOutHospitalStartDate(Date outHospitalStartDate) {
		this.outHospitalStartDate = outHospitalStartDate;
	}

	public Date getOutHospitalEndDate() {
		return outHospitalEndDate;
	}

	public void setOutHospitalEndDate(Date outHospitalEndDate) {
		this.outHospitalEndDate = outHospitalEndDate;
	}

	
	
	public String getMrId() {
		return StringUtil.meaningStr(mrId);
	}

	public void setMrId(String mrId) {
		this.mrId = mrId;
	}

	public Integer getOutHospitalOfficeId() {
		return outHospitalOfficeId;
	}

	public void setOutHospitalOfficeId(Integer outHospitalOfficeId) {
		this.outHospitalOfficeId = outHospitalOfficeId;
	}

	public List<Integer> getOutHospitalTypeIds() {
		return outHospitalTypeIds;
	}

	public void setOutHospitalTypeIds(List<Integer> outHospitalTypeIds) {
		this.outHospitalTypeIds = outHospitalTypeIds;
	}
	
	public String getOutHosTypeIds() {
		return StringUtils.trimToNull(outHosTypeIds);
	}

	public void setOutHosTypeIds(String outHosTypeIds) {
		this.outHosTypeIds = outHosTypeIds;
	}
	
	

	public Integer getTreamentTraceTypeId() {
		return treamentTraceTypeId;
	}

	public void setTreamentTraceTypeId(Integer treamentTraceTypeId) {
		this.treamentTraceTypeId = treamentTraceTypeId;
	}
	
	

	public Integer getVisitNumber() {
		return visitNumber;
	}

	public void setVisitNumber(Integer visitNumber) {
		this.visitNumber = visitNumber;
	}
	
	
	

	public Date getScanStartDate() {
		return scanStartDate;
	}

	public void setScanStartDate(Date scanStartDate) {
		this.scanStartDate = scanStartDate;
	}

	public Date getScanEndDate() {
		return scanEndDate;
	}

	public void setScanEndDate(Date scanEndDate) {
		this.scanEndDate = scanEndDate;
	}
	
	

	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}
	
	

	public Integer getPaginationStatus() {
		return paginationStatus;
	}

	public void setPaginationStatus(Integer paginationStatus) {
		this.paginationStatus = paginationStatus;
	}

	public Boolean IsPropertyEmpty(){
		if(this.getName() == null && this.getIdCard() == null &&this.getScanStartDate()==null && this.getScanEndDate()==null
				&& this.getOutHospitalStartDate() == null && this.getOutHospitalEndDate() == null
				&& this.getMrId() == null && this.getOutHospitalOfficeId() == null &&this.getVisitNumber()==null
				&& this.getOutHospitalTypeIds().size()==0 && this.getOutHosTypeIds()==null && this.getPaginationStatus()==null){
			return true;
		}
		return false;
	}
}
